# -*- mode: python -*-
block_cipher = None

a = Analysis(
    ['sshexec.py'],
    pathex=['/root/sshexec', '/root/sshexec/src'],  # ← 添加src目录
    binaries=[],
    datas=[],
    hiddenimports=[
        'src.asyncssh.asyncssh', 
        'src.asyncssh.asyncssh_utils', 
        'src.transfer.transfer',
        'src.transfer.transfer_check',
        'src.transfer.transfer_utils',
        'paramiko',
        'cryptography',
        'asyncssh',
        'fabric',
        'rich',
        'openpyxl',
        'loguru'
    ],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=['config', 'dict'],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='sshexec',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    console=True,
    onefile=True,  # 单文件模式
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
)


